package com.wl.designpattern.responsibility;

/**
 * Created by wangliang on 2021/2/22.
 */
public class ShanghaiPostman extends Postman {
    @Override
    public void handleDelivery(String address) {
        if(address.equals("Shanghai")) {
            System.out.println("派送到上海");
        } else {
            if(nextPostman != null)
                nextPostman.handleDelivery(address);
        }
    }
}
